-- GENERATED SPELL FOR [Underbog Colossus] --


function spell0_21251(pUnit, Event) --@Acid Geyser,n/a--
pUnit:FullCastSpellOnTarget(38971,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21251', 8000, 1)
end

function spell1_21251(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(39031,pUnit)
pUnit:RegisterEvent('Sorts_21251', 8262, 1)
end

function spell2_21251(pUnit, Event) --@Initial Infection,n/a--
pUnit:FullCastSpellOnTarget(39032,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21251', 2274, 1)
end

function spell3_21251(pUnit, Event) --@Serpentshrine Parasite,n/a--
pUnit:FullCastSpellOnTarget(39044,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21251', 10000, 1)
end

function spell4_21251(pUnit, Event) --@Spore Quake,Self--
pUnit:FullCastSpellOnTarget(38976,pUnit)
pUnit:RegisterEvent('Sorts_21251', 8000, 1)
end

function spell5_21251(pUnit, Event) --@Toxic Pool,Self--
pUnit:FullCastSpellOnTarget(38718,pUnit)
pUnit:RegisterEvent('Sorts_21251', 10000, 1)
end

function Sorts_21251(pUnit, Event)
local choix_sorts_21251 = math.random(0, 5)
if choix_sorts_21251 == 0 then
pUnit:RegisterEvent('spell0_21251', 1, 1)
end
if choix_sorts_21251 == 1 then
pUnit:RegisterEvent('spell1_21251', 1, 1)
end
if choix_sorts_21251 == 2 then
pUnit:RegisterEvent('spell2_21251', 1, 1)
end
if choix_sorts_21251 == 3 then
pUnit:RegisterEvent('spell3_21251', 1, 1)
end
if choix_sorts_21251 == 4 then
pUnit:RegisterEvent('spell4_21251', 1, 1)
end
if choix_sorts_21251 == 5 then
pUnit:RegisterEvent('spell5_21251', 1, 1)
end
end

function mob21251_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21251', math.random(1500, 3000), 1)
end

function mob21251_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21251_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21251_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21251, 1, 'mob21251_Action')
RegisterUnitEvent(21251, 2, 'mob21251_Leave')
RegisterUnitEvent(21251, 3, 'mob21251_Kill')
RegisterUnitEvent(21251, 4, 'mob21251_Die')
